package com.source.auto.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author wangchangjie
 * @date 2025/1/17 09:27
 */
public class DateUtil {

    public static String getDateNow() {
        // 获取当前日期和时间
        LocalDateTime currentDateTime = LocalDateTime.now();

        // 格式化为 yyyy-MM-dd HH:mm:ss 形式
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return currentDateTime.format(formatter);
    }

}
